package edu.spec.dengyan.week05.class1.work1.Extends;

public class Animal {
    private String name;
    private String gender;
    private int age;
    private String food;
    public Animal()
    {

    }

    public Animal(String name,String gender,int age,String food)
    {
        this.name=name;
        this.gender=gender;
        this.age=age;
        this.food=food;
    }

    public static void main(String[] args){

    }

    public void eat()
    {
        System.out.println( "我叫"+getName() +"我吃虫。");
    }

    public void born()
    {
        System.out.println("我出生在：" +
                getAge()+"年前。");
    }

    public void breed()
    {
        System.out.println("我繁殖很快。");
    }


    public String getName()
    {
        return name;
    }

    public String getGender()
    {
        return gender;
    }

    public int getAge()
    {
        return age;
    }
}
